extends menu
block nav
    ul(class="nav navbar-nav")
        li <a href="/Project/Dashboard/#{Project.ProjectId}"><i class="fa fa-dashboard fa-fw"></i>概览</a>
        li <a href="/Task/#{Project.ProjectId}"><i class="fa fa-tasks fa-fw"></i>任务</a>
        li(class="active") <a href="/Team/#{Project.ProjectId}"><i class="fa fa-users fa-fw"></i>团队</a>
        li <a href="#"><i class="fa fa-cogs fa-fw"></i>设置【#{Project.ProjectName}】</a>
block append content
    div(class="container-fluid")
        div(class="panel panel-info" ng-controller="TeamCtrl" ng-init="ProjectId=#{Project.ProjectId};GetMemberCandidate();GetMemberInProject();Creator=#{Project.UserId};CurrentUser=#{User.UserId}")
            div(class="panel-heading") <i class="fa fa-users fa-fw"></i>项目团队设置
            div(class="panel-body")
                form(class="form-inline" role="form" ng-show="true")
                    div(class="alert alert-success alert-dismissable" ng-show="AddSuccess")
                        button(type="button" class="close" data-dismiss="alert" aria-hidden="true") &times;
                        strong 添加新成员成功!
                    div(class="alert alert-success alert-dismissable" ng-show="RemoveSuccess")
                        button(type="button" class="close" data-dismiss="alert" aria-hidden="true") &times;
                        strong 删除成员成功!
                    div(class="input-group")
                        span(class="input-group-addon") <i class="fa fa-user fa-fw"></i>
                        input(type="text" class="form-control" ng-model="Word" placeholder="请输入待添加成员的电子邮件/昵称")
                        span(class="input-group-addon") <i class="fa fa-search fa-fw"></i>
                    div(class="notice notice-info row" ng-show="(MemberCandidate | filter:Word).length>0 && Word.length>0")
                        div(ng-repeat="Member in MemberCandidate | filter:Word")
                            div(class="col-sm-3")
                                div(class="panel panel-default")
                                    div(class="panel-body text-center")
                                        p <strong>{{Member.Nick}}</strong>
                                        p(class="text-muted") {{Member.Email}}
                                        p <button type="button" class="btn btn-success" ng-click="AddMember(Member.Email)"><i class="fa fa-plus-square fa-fw"></i>添加</button>
                    div(class="panel panel-default")
                        div(class="panel-body")
                            div(class="row")
                                div(ng-repeat="Member in MemberList")
                                    div(class="col-sm-3")
                                        div(class="panel panel-default")
                                            div(class="panel-body text-center")
                                                p <strong>{{Member.Nick}}</strong>
                                                p(class="text-muted") {{Member.Email}}
                                                p  <button ng-show="Creator==CurrentUser" type="button" ng-disabled="Creator==Member.UserId" class="btn btn-danger" ng-click="RemoveMember(Member.UserId)"><i class="fa fa-trash-o fa-fw"></i>移除</button>